<!DOCTYPE html>
<html>
<head lang="zh_CN">
    <title>${entityComment}</title>
    <meta charset="UTF-8">
    <script type="text/javascript" src="../../../common/js/bootstrap.js"></script>
    <script type="text/javascript" src="../../../erajs/jquery.ztree.all-3.5.min.js"></script>
    <script type="text/javascript" src="../../../common/js/common.formatter.function.js"></script>
    <script type="text/javascript" src="../js/${objectName}List.js"></script>
    <-- todo 注意要加入一些formatter 要记得引入js-->
</head>
<body>
<div xtype="layout" border="false" id="${objectName}_query_layout">
    <div data-options="region:'north',border:true,collapsible:false" style="height: 45px">
        <form id="searchForm${entityName}" name="searchForm${entityName}" class="form-css">
            <ul class="content_ul">
                <li class="form-btn" style="float : left">
                    <div id="addBtn" xtype="button" class="middleBtn but-w80 but-bg" style="margin-left: 2px;"
                         onclick="add${entityName}()">
                        <span class="LANGS" langid="common.window.add">新增</span>
                    </div>
                </li>
                <li class="form-btn" style="float : left">
                    <div id="editBtn" xtype="button" class="middleBtn but-w80 but-bg" style="margin-left: 2px;"
                         onclick="edit${entityName}()">
                        <span class="LANGS" langid="common.window.edit">修改</span>
                    </div>
                </li>
                <li class="form-btn" style="float : left">
                    <div id="deleteBtn" xtype="button" class="middleBtn but-w80 but-bg" style="margin-left: 2px;"
                         onclick="delete${entityName}()">
                        <span class="LANGS" langid="common.window.remove">删除</span>
                    </div>
                </li>
                <li class="form-btn" style="float : left">
                    <div id="more" xtype="menubutton" class="middleBtn but-w80 but-bg" style="margin-left: 2px;"
                         data-options="
                            menu:'#moreMenu',
                            plain:false
                            "><span class="LANGS" langid="common.window.export">导出</span>
                    </div>
                </li>
                <li class="form-btn" style="float : left">
                    <div onclick="importData()" xtype="button" class="but-w80 but-bg" style="margin-left: 2px;">
                        <span class="LANGS" langid="common.window.DataImport">导入</span>
                    </div>
                </li>

                <div style="float: right">
                    <li class="title95">
                        <span class="LANGS" langid="${serviceName}.${objectName}.field.primaryKey">主键</span>：</li>
                    <li class="input120">
                        <input xtype="textbox" class="input-css"  id="primaryKey" name="primaryKey"/>
                    </li>
                    <li class="title95">
                        <div xtype="button" id="selectBtn" class="middleBtn but-w80 but-bg" style="margin-right: 6px;"
                             custom-options="btnType: 'query', refDgId: 'dataGrid${entityName}'">
                            <span class="LANGS" langid="common.window.query">查询</span>
                        </div>
                    </li>
                </div>

            </ul>
        </form>
    </div>
    <div data-options="region:'center',border:false" class="paddingTop3" style="padding:12px;">
        <table id="dataGrid${entityName}" xtype="datagrid" style="width:100%;height:100%"
               data-options="
                  rownumbers: true,
                  singleSelect: true,
                  fitColumns: true,
                  showTip:true,
                  autoLoad: true,
                  toolbar:'#toolbar',
                  url:erajs.baseURL() +'${serviceName}/${objectName}/queryPage.action'"
               custom-options=" queryFormName: 'searchForm${entityName}',identifyField : ['primaryKey']">
			   <!--todo 改为相应的查询条件-->
            <thead>
            <tr>
                <th data-options="field:'ck',width:'2%',checkbox:true"></th>
				<#list cis as ci>
				<#if ci.jdbcTypeUp == 'DECIMAL'>
				<th data-options="tip:true,field:'${ci.property}',width:'10%',halign:'center',align:'right',formatter:formatAmount4">
					<span class="LANGS" langid="${serviceName}.${objectName}.field.${ci.property}">${ci.comment}</span>
				</th>
				<#else>
				<th data-options="tip:true,field:'${ci.property}',width:'10%',halign:'center',align:'center'">
					<span class="LANGS" langid="${serviceName}.${objectName}.field.${ci.property}">${ci.comment}</span>
				</th>
				</#if>
				</#list>
            </tr>
            </thead>
        </table>
    </div>
</div>

<!--导入导出-->
<div id="moreMenu" class="more-menu-list">
    <div onclick="exportCurrentPageData()">
        <span class="LANGS" langid="common.window.exportPage">导出当前页</span>
    </div>
    <div onclick="exportAllData()">
        <span class="LANGS" langid="common.window.exportAll">导出全部</span>
    </div>
    <div onclick="exportTemplate()">
        <span class="LANGS" langid="common.window.exportTemplate">导出模板</span>
    </div>
    <form target="_top" method="POST" enctype="multipart/form-data" id="importForm" name="importForm" class="query-form">
        <input type="hidden" id="importType" name="importType" value="">
        <div style="display:none;">
            <input xtype="filebox" name="file" id="file" data-options="onChange:importFileChange">
        </div>
    </form>
</div>
</body>
</html>